
var path = require("path");
var fs = require("fs");

let filePath = path.join(__dirname,  "user.json");

function readUser() {
    let user = fs.readFileSync(filePath, 'utf8')
    let t=JSON.parse(user);
    return t;
}
function setUser(user) {
  let  t = JSON.stringify(user);
  fs.writeFileSync(filePath,t)
}
exports.readUser = readUser;
exports.setUser = setUser;